package com.hongdee.insurance.commission.service;

import com.hongdee.insurance.commission.entity.TInsuranceCommission;

import java.util.List;
import java.util.Map;

/**
 * Created by Mr. Xu on 2017/4/25.
 */
public interface ITCommissionSrevice {
    /**
     * 保险公司分页查询
     * @param uid
     * @param data
     * @return
     * @throws Exception
     */
    public Map page(String uid, String start, String limit, Map data) throws Exception;
    public void queryCommissionPageToSql(StringBuffer sql,Map data,List params) throws Exception;
    public Map applyUnitPage(String uid, String start, String limit, Map data) throws Exception;
    /**
     * 佣金明细
     *
     * @param id
     * @return
     * @throws Exception
     */
    public Map info(String id) throws Exception;
    /**
     * 新增或者修改佣金
     *
     * @param data
     * @return
     * @throws Exception
     */
    public void saveOrUpdate(TInsuranceCommission data,String uid,List<String> carCompanyList) throws Exception;


    /**
     * 获得车辆销售公司
     * @return
     */
    public List<Map<String,Object>> getCarCompanys(String area) throws Exception;

    /**
     *
     * @param id
     * @param uid
     * @return
     * @throws Exception
     */
    public Map<String,Object> getCarInsuranceCommissionById(String id,String time,String uid,String iscompulsoryinsurance,
                                                            String companyId) throws Exception;


    /**
     * 生成报价点，出单
     * @param id
     * @param time
     * @param uid
     * @return
     * @throws Exception
     */
    public Map<String,Object> getCarInsuranceCommissionByIdToBill(String id,String time,String uid,String companyId) throws Exception;

    public List<Map<String, Object>> getCarCompanysToBill() throws Exception ;

    /**
     * 审核佣金信息
     * @param data
     * @param status
     * @param uid
     */
    public void examCommissonStatus(List<Map> data,String status,String uid,String remark) throws Exception;

    /**
     * 根据佣金ID 获得佣金的审核日志信息
     * @param id
     * @return
     * @throws Exception
     */
    public List<Map<String, Object>> findExalLogs(String id) throws Exception;

    /**
     * 停用启用佣金信息
     * @param id
     * @param status
     * @throws Exception
     */
    public void enableAndDisableCommission(String id,String status) throws Exception ;

    /**
     * 检测时间是否有相同的
     * @param data
     * @param tpl
     * @param entity
     * @throws Exception
     */
    public void checkCommissionDate(List<Map<String,Object>> data,String tpl,TInsuranceCommission entity) throws Exception;

    /**
     * 更新佣金率信息
     * @param commissionId
     * @throws Exception
     */
    public void updOrderItemCommissionPrice(String commissionId,String companyId) throws Exception;

    /**
     * 获得佣金详情
     * @param id
     * @return
     * @throws Exception
     */
    public TInsuranceCommission getInfo(String id) throws Exception;

}
